﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="Content/bootstrap.min.css">
    <link rel="stylesheet" href="Content/bootstrap-theme.min.css">
    <title>Home screen to upload videos</title>
</head>
<body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">Azure Media Services</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="default.html">Upload Video</a></li>
                    <li><a href="#">Get Encode Progress</a></li>
                    <li><a href="#">Get Stream Url</a></li>
                    <li><a href="#">Play Video</a></li>
                </ul>
            </div>
        </div>
    </nav>
    <div class="col-xs-12" style="height:70px;"></div>
    <div class="container theme-showcase" role="main">
        <div class="jumbotron">
            <h2>Video Streaming through Azure Media Services</h2>
            <p>Example illustrates uploading video to azure, tracking upload and encode progress and getting stream url to deliver video streaming experience. The stream URL can be used on any client (desktop/browers/mobile) for adaptive video play back.</p>
            <p>Scenario Coverd in the Example:</p>
            <ol>
                <li>Upload Video to Azure</li>
                <li>Get Encode Progress</li>
                <li>Get Video Stream URL</li>
                <li>Play Video</li>
            </ol>
        </div>
    </div>
    <div class="container">
        <form data-toggle="validator" id="uploadForm" role="form">
            <div class="form-group row">
                <label class="col-sm-2">Upload Video</label>
                <div class="col-sm-10 custom-file">
                    <div class="form-check">
                        <label class="custom-file">
                            <input type="file" id="myFile" class="custom-file-input" required>
                            <span class="custom-file-control"></span>
                        </label>
                    </div>
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-2"></label>
                <div class="col-sm-10">
                    <button type="submit" id="Upload" name="Upload" class="btn btn-primary" data-toggle="modal">Submit</button>
                </div>
            </div>

            <div id="myModal" class="modal fade" role="dialog" data-backdrop="static" data-keyboard="false">
                <div class="modal-dialog">
                    <!-- Modal content-->
                    <div class="modal-content">
                        <div class="modal-header">
                            <h4 class="modal-title">Uploading Video</h4>
                        </div>
                        <div class="modal-body">
                            <div id="progressStatus">
                                <div class="progress">
                                    <div class="progress-bar progress-bar-info progress-bar-striped" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
                                        <span class="sr-only"></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>


        </form>
    </div>

    <script src="Scripts/jquery-1.9.1.min.js"></script>
    <script src="Scripts/bootstrap.min.js"></script>
    <script src="Scripts/custom.js"></script>
    <script type="text/javascript">
        $("#uploadForm").submit(function (event) {
            event.preventDefault();
            AZ.PostVideo();
        });
    </script>
</body>
</html>